import java.util.Random;

public class dogMoon {
    public static void main(String[] args) {
        Random r = new Random();
        int count = 0;
        while (true) {
            int num = r.nextInt(1, 50);
            System.out.println(num);
            count++;
            if (num == 32) {
                System.out.println("次数：" + count);
                break;
            }
        }
    }
}